package py.edu.ucsa.sisale.dao;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;


import py.edu.ucsa.sisale.dao.impl.EstadoImpl;

public class DaoFactory {
	private static EntityManager em;
	
	public static EstadoDAO getEstado() {
		return new EstadoImpl();
	}
	
	public static EntityManager getEm() {
		EntityManagerFactory emf = Persistence.createEntityManagerFactory("sisalews");
		if(null == em)
			em = emf.createEntityManager();
		return em;
	}
	
	
}
